<?php namespace Phpcmf\Controllers\Member;

class Home extends \Phpcmf\Member\Module
{

    public function index() {

        $zone = $this->content_model->get_zone($this->uid);
        if (!$zone) {
            $this->_Member_Add();
            exit;
        }

        $this->edit(); // 未开启空间

    }

    public function add() {
        $this->_Member_Add();
    }

    public function edit() {

        $_GET['id'] = $this->content_model->get_zone_id($this->uid);

        if ($_GET['id']) {
            $this->_Member_Edit();
        } else {
            $this->_Member_Add();
        }

    }
}
